package com.gdut.huayan.utils;

public class StringUtils {

    public static boolean isEmpty(String... strs) {
        for (String str : strs) {
            if (str == null || str.length() == 0) {
                return true;
            }
        }
        return false;
    }

    public static boolean isNotEmpty(String... str) {
        return !isEmpty(str);
    }

    //若空或超过6位返回原本的
    public static String beDigits(Long s) {
        if (s >= 10000000) {
            s = s % 10000000;
        }
        return str[s.toString().length()] + s;
    }

    public static String beDigits(String s){
        if (s.length() > 6){
            return s.substring(s.length() - 6);
        }else {
            return str[s.length()] + s;
        }
    }

    private static final String[] str = new String[]{"0000000","000000", "00000", "0000", "000", "00", "0", ""};

    public static Long reverseNumber(String number) {
        return Long.valueOf(number,36);
    }

}
